package henkolib.html5;

/**
 * @author Henko
 */

extern class WebSocket 
{
	public function new(url:String, ?protocols:Array<String>):Void;
	
	public var readyState(default, never):Int;
	public var bufferedAmound(default, never):Int;
	
	public function send(data:String):Void;
	public function close():Void;
	
	public var onopen : Void -> Void;
	public var onclose : Void -> Void;
	public var onmessage : MessageEvent -> Void;
}